OpenCities Map Help

Expression Length

XFM must pre-process an expression to replace feature property specifications with a property value so a concise expression will be quicker to pre-process.

For example:

  1. To compare a single property to numerous values, then use the COMPARE function with a delimited list of values instead of separate COMPARE functions.

    Instead of

    COMPARE("[SIZE]","220","") || COMPARE("[SIZE]","240","") || COMPARE("[SIZE]","640","")

    Consider

    COMPARE("[SIZE]","220|240|640","|")

  2. If multiple property comparisons all need to be true for a symbology item to be used, consider using a single COMPARE function call with a combination of property values instead of separate COMPARE functions.

    Instead of

    COMPARE("[SIZE]","220","") && COMPARE("[TYPE]","BT","") && COMPARE("[LARGE]","YES","")

    Consider

    COMPARE("[SIZE][TYPE][LARGE]","220BTYES","")

  3. If a property is numeric, compare the property value directly to avoid a function call to the COMPARE function.

    Instead of

    COMPARE("[SIZE]","220","")

    Consider

    [SIZE]==220

Note: If the SIZE property value is empty string, the expression would be pre-processed to an invalid expression: “==220”. If the value may be empty, then use the default value specification in the property specification. To specify a default value, add a vertical bar (|) character followed by the default value after the property name: [SIZE|0]==220.